package com.jilintongyi.jlcrtvu.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * WebMvc配置
 */
@Configuration // 不使用Swagger时，注释掉此行
public class WebMvcConfig extends WebMvcConfigurationSupport {
	/**
	 * 资源处理
	 */
	@Override
	protected void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
		registry.addResourceHandler("/swagger-ui/**")
				.addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/"); // Swagger 3静态资源
	}
}
